package la.iok.hzsvn.lewin.movie.core.model;

import la.iok.hzsvn.share.annotations.NotNull;

public enum OrgUnitType {
    INVALID(0,"无效"),SHOP(1,"店铺"), FRANCHISEE(2,"加盟商");

    private final int code;
    private final String name;

    OrgUnitType(int code, String name){
        this.code = code;
        this.name = name;
    }
    @NotNull
    public static OrgUnitType valueOf(int code){
        for(OrgUnitType gt : values()){
            if(gt.code == code){
                return gt;
            }
        }
        return INVALID;
    }
    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
